function [p] = set_p(taskname,phase,options)
p.trials = [];
p.stimulus = [];
switch phase
    case 'training'
        n_trials = 8;
    case 'staircase'
        n_trials = 60;
    case 'task'
        n_trials = 30;
end
switch taskname
    case 'baldassi'
    stimulus.angle = 45*x*sign(rand-.5);
    stimulus.angles{j}=stimulus.angle
    stimulus.n = 6;
    trials{j} = run_trial(task,stimulus);
    
end